package com.itguigu.ioc_05;

import org.springframework.beans.factory.FactoryBean;

/**
 * 图书工厂
 */
public class BookFactoryBean implements FactoryBean<Book> {
    private String bookName;

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    @Override
    public Book getObject() throws Exception {
        Book book = new Book();
        book.setName(bookName);
        return book;

    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }
}
